package org.grow.leave.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.grow.leave.entity.ApplyQueryCondition;
import org.grow.leave.entity.AuditQueryCondition;
import org.grow.leave.entity.LeaveBill;
import org.grow.leave.entity.enums.ApplyState;
import org.grow.leave.entity.enums.AuditState;

import java.util.List;

@Mapper
public interface LeaveBillMapper extends BaseMapper<LeaveBill> {
    List<LeaveBill> dynamicQueryApply(@Param("qc") ApplyQueryCondition qc,
                                      @Param("applier") String applier);

    IPage<LeaveBill> dynamicQueryApply(IPage<LeaveBill> page,
                                       @Param("qc") ApplyQueryCondition qc,
                                       @Param("applier") String applier);

    List<LeaveBill> dynamicQueryAudit(@Param("qc") AuditQueryCondition qc,
                                      @Param("applyState") ApplyState applyState);

    IPage<LeaveBill> dynamicQueryAudit(IPage<LeaveBill> page,
                                       @Param("qc") AuditQueryCondition qc,
                                       @Param("applyState") ApplyState applyState);
}